package com.indusfo.spc.client.mapper;

import com.indusfo.spc.pojo.OrderFlow;
import com.indusfo.spc.pojo.Pro;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chenm
 * @create 2019-12-06 20:02
 */
public interface ClientProMapper {

	List<Pro> selectProByProIds(@Param("proIds") List<Integer> proIds);
	
	Pro selectByProId(@Param("proId") Integer proId);

	/**
	 * 根据批次ID查询全部工序
	 * 
	 * @author zhengd
	 * @param batchId
	 * @return
	 */
	List<OrderFlow> selectAllProByBatchId(@Param("batchId") Integer batchId);

	/**
	 * 根据批号ID查询下道工序的类型
	 * 
	 * @param batchId
	 * @return
	 */
	Integer queryNextProTypeIdByBatchId(@Param("batchId") Integer batchId);
	
	/**
	 * 根据任务单ID查询工序
	 * 
	 * @author zhengd
	 * @param orderId
	 * @return
	 */
	List<OrderFlow> selectProByOrderId(@Param("orderId") Integer orderId);


	List<Pro> selectProByOrderTechIdAndStationId(@Param("orderTechId") Integer orderTechId,@Param("stationId") Integer stationId);

}
